package pandoraproject.model;

import javax.persistence.Entity;

@Entity
public enum Country {
	
	/* TODO : complete the list of country */
	BELGIUM("Belgium", "BE", Continent.EUROPE),
	FRANCE("France", "FR", Continent.EUROPE);
	
	private String name;
	private String code;
	private Continent continent;
	
	private Country(String name, String code, Continent continent) {
		this.name = name;
		this.code = code;
		this.continent = continent;
	}
	
	////////////////////////////////////////
	//////////// Generated code ////////////
	////////////////////////////////////////
	
	public String getName() {
		return name;
	}

	public String getCode() {
		return code;
	}

	public Continent getContinent() {
		return continent;
	}
	

	////////////////////////////////////////
	/////////////// Sub enum ///////////////
	////////////////////////////////////////
	
	enum Continent {
		
		AMERICA("America"),
		ASIA("Asia"),
		AFRICA("Africa"),
		EUROPE("Europe"),
		OCEANIA("Oceania"),
		ANTARTICA("Antartica");
		
		private String name;
		
		Continent(String name) {
			this.name = name;
		}
		
		public String getName() {
			return this.name;	
		}
	}
}
